#include<iostream>
using namespace std;
int main()
{
	int n,i;
	cin>>n;
	int a,b;
	float x,y;
	cin>>a>>b;
	x=1.*b/a;
	for(i=1;i<n;i++)
	{
		cin>>a>>b;
		y=1.*b/a;
		if(y-x>0.05)
		cout<<"better"<<endl;
		else if(x-y>0.05)
		cout<<"worse"<<endl;
		else
		cout<<"same"<<endl;
		
	}
	return 0;
}
